package com.ly.heart.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ly.common.utils.DateUtils;
import com.ly.heart.service.ICarCardManageDetailService;
import org.springframework.stereotype.Service;
import com.ly.heart.mapper.CarCardManageDetailMapper;
import com.ly.heart.domain.CarCardManageDetailEntity;

import javax.annotation.Resource;

/**
 * 车务充值下发明细Service业务层处理
 *
 * @author cxl
 * @date 2024-09-08
 */
@Service
public class CarCardManageDetailServiceImpl extends ServiceImpl<CarCardManageDetailMapper,CarCardManageDetailEntity> implements ICarCardManageDetailService {

    @Resource
    private CarCardManageDetailMapper carCardManageDetailMapper;

    /**
     * 查询车务充值下发明细
     *
     * @param id 车务充值下发明细ID
     * @return 车务充值下发明细
     */
    @Override
    public CarCardManageDetailEntity selectCarCardManageDetailEntityById(String id)
    {
        return carCardManageDetailMapper.selectCarCardManageDetailEntityById(id);
    }

    /**
     * 查询车务充值下发明细列表
     *
     * @param carCardManageDetailEntity 车务充值下发明细
     * @return 车务充值下发明细
     */
    @Override
    public List<CarCardManageDetailEntity> selectCarCardManageDetailEntityList(CarCardManageDetailEntity carCardManageDetailEntity)
    {
        return carCardManageDetailMapper.selectCarCardManageDetailEntityList(carCardManageDetailEntity);
    }

    /**
     * 新增车务充值下发明细
     *
     * @param carCardManageDetailEntity 车务充值下发明细
     * @return 结果
     */
    @Override
    public int insertCarCardManageDetailEntity(CarCardManageDetailEntity carCardManageDetailEntity)
    {
        carCardManageDetailEntity.setCreateTime(DateUtils.getNowDate());
        return carCardManageDetailMapper.insertCarCardManageDetailEntity(carCardManageDetailEntity);
    }

    /**
     * 修改车务充值下发明细
     *
     * @param carCardManageDetailEntity 车务充值下发明细
     * @return 结果
     */
    @Override
    public int updateCarCardManageDetailEntity(CarCardManageDetailEntity carCardManageDetailEntity)
    {
        carCardManageDetailEntity.setUpdateTime(DateUtils.getNowDate());
        return carCardManageDetailMapper.updateCarCardManageDetailEntity(carCardManageDetailEntity);
    }

    /**
     * 批量删除车务充值下发明细
     *
     * @param ids 需要删除的车务充值下发明细ID
     * @return 结果
     */
    @Override
    public int deleteCarCardManageDetailEntityByIds(String[] ids)
    {
        return carCardManageDetailMapper.deleteCarCardManageDetailEntityByIds(ids);
    }

    /**
     * 删除车务充值下发明细信息
     *
     * @param id 车务充值下发明细ID
     * @return 结果
     */
    @Override
    public int deleteCarCardManageDetailEntityById(String id)
    {
        return carCardManageDetailMapper.deleteCarCardManageDetailEntityById(id);
    }
}
